#include "DmMainAfx.h"
#include "DMRenderSMTBmpImpl.h"
#include "DMBitmapSMTBmpImpl.h"
#include "DMCanvasSMTBmpImpl.h"

namespace DM {
DMCode DMRenderSMTBmpImpl::CreateBitmap(IDMBitmap **ppBitmap) {
  DMCode iErr = DM_ECODE_FAIL;
  do {
    if (NULL == ppBitmap) {
      break;
    }
    *ppBitmap = new DMBitmapSMTBmpImpl();
    iErr = DM_ECODE_OK;
  } while (false);
  return iErr;
}

DMCode DMRenderSMTBmpImpl::CreateCanvas(int nWid, int nHei, IDMCanvas **ppCanvas) {
  DMCode iErr = DM_ECODE_FAIL;
  do {
    if (NULL == ppCanvas) {
      break;
    }

    *ppCanvas = new DMCanvasSMTBmpImpl(this, nWid, nHei);
    iErr = DM_ECODE_OK;
  } while (false);
  return iErr;
}
}  // namespace DM
